package com.dhcc.model;

import javax.persistence.*;

/**
 * Created by guorui on 2017/3/17.
 */
@Entity
@Table(name = "tb_gct", schema = "test", catalog = "")
public class Gct {
    private int gctId;
    private String gctQue;
    private String gctAns;
    private int cId;

    @Id
    @Column(name = "gct_id", nullable = false)
    public int getGctId() {
        return gctId;
    }

    public void setGctId(int gctId) {
        this.gctId = gctId;
    }

    @Basic
    @Column(name = "gct_que", nullable = false, length = 255)
    public String getGctQue() {
        return gctQue;
    }

    public void setGctQue(String gctQue) {
        this.gctQue = gctQue;
    }

    @Basic
    @Column(name = "gct_ans", nullable = true, length = -1)
    public String getGctAns() {
        return gctAns;
    }

    public void setGctAns(String gctAns) {
        this.gctAns = gctAns;
    }

    @Basic
    @Column(name = "c_id", nullable = false)
    public int getcId() {
        return cId;
    }

    public void setcId(int cId) {
        this.cId = cId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Gct gct = (Gct) o;

        if (gctId != gct.gctId) return false;
        if (cId != gct.cId) return false;
        if (gctQue != null ? !gctQue.equals(gct.gctQue) : gct.gctQue != null) return false;
        if (gctAns != null ? !gctAns.equals(gct.gctAns) : gct.gctAns != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = gctId;
        result = 31 * result + (gctQue != null ? gctQue.hashCode() : 0);
        result = 31 * result + (gctAns != null ? gctAns.hashCode() : 0);
        result = 31 * result + cId;
        return result;
    }
}
